# RUN: llvm-mc -triple=arc -disassemble %s | FileCheck %s

# CHECK: mov %r0, -1
0x8a 0x20 0xff 0x0f

# 32767 == 0x7fff
# CHECK: mov %r4, 32767
0x0a 0x24 0x80 0x0f 0x00 0x00 0xff 0x7f

# CHECK: mov.eq %r2, %r6
0xca 0x22 0x81 0x01

# CHECK: mov %r13, %r2
0x0a 0x25 0x80 0x10

# CHECK: mov %r1, 20
0x4a 0x21 0x00 0x05

# CHECK: mov.eq %r0, 32
0xca 0x20 0x21 0x08

# CHECK: mov.ne %r0, 0
0xca 0x20 0x22 0x00

# CHECK: mov.eq %r0, 0
0xca 0x20 0x21 0x00

# CHECK: mov.lt %r6, 16
0xca 0x26 0x2b 0x04

# CHECK: mov.le %r15, 31
0xca 0x27 0xec 0x17

# CHECK: mov.gt %r0, 0
0xca 0x20 0x29 0x00

# CHECK: mov.ge %r6, 16
0xca 0x26 0x2a 0x04

# CHECK: mov.p %r15, 31
0xca 0x27 0xe3 0x17

# CHECK: mov.n %r0, 0
0xca 0x20 0x24 0x00

# CHECK: mov.vs %r6, 16
0xca 0x26 0x27 0x04

# CHECK: mov.pnz %r15, 31
0xca 0x27 0xef 0x17

# CHECK: mov.f %r0, 0
0x4a 0x20 0x00 0x80

# CHECK: mov.f %r6, 16
0x4a 0x26 0x00 0x84

# CHECK: mov.f %r15, 31
0x4a 0x27 0xc0 0x97

# CHECK: mov.eq.f %r0, 0
0xca 0x20 0x21 0x80

# CHECK: mov.lt.f %r6, 16
0xca 0x26 0x2b 0x84

# CHECK: mov.le.f %r15, 31
0xca 0x27 0xec 0x97

# CHECK: mov.gt.f %r0, 0
0xca 0x20 0x29 0x80

# CHECK: mov.ge.f %r6, 16
0xca 0x26 0x2a 0x84

# CHECK: mov.p.f %r15, 31
0xca 0x27 0xe3 0x97

# CHECK: mov.n.f %r0, 0
0xca 0x20 0x24 0x80

# CHECK: mov.vs.f %r6, 16
0xca 0x26 0x27 0x84

# CHECK: mov.pnz.f %r15, 31
0xca 0x27 0xef 0x97

# CHECK: st.aw %fp, [%sp,-4]
0xfc 0x1c 0xc8 0xb6

# CHECK: ld.ab %fp, [%sp,4]
0x04 0x14 0x1b 0x34

# CHECK: bl -2028
0x16 0x08 0xcf 0xff

# CHECK: cmp %r13, %r10
0x0c 0x25 0x80 0x92

# CHECK: cmp %r14, 0
0x4c 0x26 0x00 0x90

# CHECK: cmp %r23, 1
0x4c 0x27 0x40 0xa0

# CHECK: jl [%r21]
0x22 0x20 0x40 0x05

# CHECK: jl 12345
0x22 0x20 0x80 0x0f 0x00 0x00 0x39 0x30

# CHECK: j [%r3]
0x20 0x20 0xc0 0x00

# CHECK: j 12345
0x20 0x20 0x80 0x0f 0x00 0x00 0x39 0x30

# CHECK: seteq %r3, %fp, %r1
0x38 0x23 0x43 0x30

# CHECK: seteq %r3, %fp, 17
0x78 0x23 0x43 0x34

# CHECK: seteq %fp, %fp, -1
0xb8 0x23 0xff 0x3f 

# CHECK: fls %r0, %r0
0x2f 0x28 0x13 0x00

# CHECK: fls.f %r0, %r0
0x2f 0x28 0x13 0x80

# CHECK: ffs %r0, %r0
0x2f 0x28 0x12 0x00

# CHECK: ffs.f %r0, %r0
0x2f 0x28 0x12 0x80

# CHECK: ffs %r15, %r15
0x2f 0x2f 0xd2 0x13

# CHECK: ffs.f %r15, %r15
0x2f 0x2f 0xd2 0x93

# CHECK: norm %r22, %blink
0x2f 0x2e 0xc1 0x27

# CHECK: normh %r7, %r18
0x2f 0x2f 0x88 0x04
